package cate.game.role.show.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBBlog;
import cate.game.role.system.BlogConfig;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "修改系统配置 の 请求")
public class ModifyConfigReq implements MsgInput {

    @NoteField("系统配置")
    public BlogConfig blogConfig;

    @Override
    public void execute(GameBody game, ClientContext cc) {
       cc.getRole().getSystem().blogConfig.readFrom(blogConfig);
       cc.getRole().sendNow(new ModifyConfigResp(cc.getRole()));
       //game.notice.message(cc.getRole(), "修改成功");
    }


    @Override
    public MsgConfig conf() {
        return MsgIdBBlog.MODIFY_CONFIG_REQ;
    }
}
